﻿using System;
using System.Data.Entity;

namespace Jet.Dal.EF.Implementation.Contexts
{
	/// <summary>
	/// Class which declare repository for 1 entity type.
	/// <exception cref="InvalidOperationException">when TEntity is not mapped</exception>
	/// </summary>
	/// <typeparam name="TEntity"></typeparam>
	internal class DbContext1<TEntity> : DbContext0 where TEntity : class
	{
#pragma warning disable 0169
// ReSharper disable UnusedMember.Global
		protected DbSet<TEntity> DbSet1 { get; set; }
// ReSharper restore UnusedMember.Global
#pragma warning restore 0169
		public DbContext1(string connectionString, bool lazyLoadingAllowed, bool allowProxyCreation)
			: base(connectionString, lazyLoadingAllowed, allowProxyCreation)
		{
			
		}
		
		static DbContext1()
		{
			Database.SetInitializer<DbContext1<TEntity>>(null);
		}
	}
}
